home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Devices and Hardware / Disks / BasicDiskImage / MoreIsBetterBits / MoreMemory.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.6 KB  |  54 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        MoreMemory.h
  3.  
  4.     Contains:    Memory utility routines.
  5.  
  6.     Written by:    Quinn
  7.  
  8.     Copyright:    Copyright © 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.  
  20.          <1>      1/3/99    Quinn   First checked in.
  21. */
  22.  
  23. #pragma once
  24.  
  25. /////////////////////////////////////////////////////////////////
  26. // MoreIsBetter Setup
  27.  
  28. #include "MoreSetup.h"
  29.  
  30. /////////////////////////////////////////////////////////////////
  31. // Mac OS Interfaces
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. extern pascal OSErr SafeHoldMemory(void *start, ByteCount length);
  38.     // A safe version of the HoldMemory call, that does the right
  39.     // thing regardless of whether the HoldMemory trap is actually
  40.     // implemented.
  41.     //
  42.     // Note that if the system can't hold the memory because there's
  43.     // not enough physical memory, this routine will return
  44.     // notEnoughMemoryErr.
  45.  
  46. extern pascal OSErr SafeUnholdMemory(void *start, ByteCount length);
  47.     // A safe version of the HoldMemory call, that does the right
  48.     // thing regardless of whether the HoldMemory trap is actually
  49.     // implemented.
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.